<?php
// 封禁用户
// header("content-type:text/html;charset=utf-8");
include_once("conn.php");
//设置默认时区
date_default_timezone_set('PRC');
$now_date = date('Y-m-d H:i:s');

$uid = $_POST['uid'];

$sql = "UPDATE tb_user_info SET ustatus = '禁用', uchangedate = '".$now_date."' WHERE uid = '".$uid."'";
if(mysqli_query($conn, $sql)){
    echo"<script>alert('封禁成功！');window.location.href='../a_list_user.php';</script>";
}else{
    echo"<script>alert('封禁失败！请重试！');history.go(-1);</script>";
}